#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    long long a, b;
    int n, i;

    scanf("%d", &n);
    for(i = 1; i <= n; i++) {
        scanf("%lld %lld", &a, &b);

        printf("Scenario #%d:\n", i);
        printf("%lld\n\n", (a + b) * (b - a + 1) / 2);
    }

    return 0;
}
